package day3_homework;

import java.util.Calendar;
import java.util.Date;

//一件商品生产日期是2017/7/12,保质期5年，算出失效日期
public class _3 {
    public static void main(String[] args) {
        Calendar instance = Calendar.getInstance();
        instance.set(2017,7,12);
        instance.roll(Calendar.YEAR,5);
        System.out.println(instance.get(Calendar.YEAR)+"年"+instance.get(Calendar.MONTH)+"月"+instance.get(Calendar.DATE)+"日");

    }
}
